<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:composite="http://java.sun.com/jsf/composite">

<composite:interface>
	<composite:attribute name="editavel" default="true"/>
	<composite:attribute name="valor" required="true"/>
	<composite:attribute name="obrigatorio" default="true"/>
	<composite:attribute name="titulo"/>
	<composite:attribute name="maxlength" default="100"/>
	<composite:attribute name="linhas" default="4"/>
	<composite:attribute name="colunas" default="60"/>
	<composite:attribute name="style"/>
	<composite:attribute name="styleSomenteLeitura" />
	<composite:attribute name="alteracao" default="true"/>
	<composite:editableValueHolder name="validator" targets="#{cc.id}_InputTextArea" />
	<composite:attribute name="exibirBordaLeitura" default="false" required="false"/>
</composite:interface>

<composite:implementation>

	<h:outputText id="#{cc.id}_Label" value="#{cc.attrs.valor}" rendered="#{not cc.attrs.editavel}" style="font-weight:normal;#{cc.attrs.styleSomenteLeitura}"  />
	
	<p:inputTextarea id="#{cc.id}_InputTextArea" title="#{cc.attrs.titulo}" value="#{cc.attrs.valor}"
		 onkeydown="validateTextAreaLength(this,#{cc.attrs.maxlength});"
		 style="#{cc.attrs.style}" required="#{cc.attrs.obrigatorio}" rendered="#{cc.attrs.editavel}" maxlength="#{cc.attrs.maxlength}"
		 rows="#{cc.attrs.linhas}" cols="#{cc.attrs.colunas}" autoResize="false">	
	
	</p:inputTextarea>
	
	<br />
</composite:implementation>
</html>